//
//  KYGroupModel.m
//  kuaiyi
//
//  Created by 杨亮 on 16/3/14.
//  Copyright © 2016年 kuaiyi. All rights reserved.
//

#import "KYGroupModel.h"
#import "KYLeftLIstModel.h"

@implementation KYGroupModel
-(instancetype)initWithDict:(NSDictionary *)dict{
    if (self = [super init]) {
        [self setValuesForKeysWithDictionary:dict];
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dict in self.section) {
            KYLeftLIstModel *list = [KYLeftLIstModel leftListWithDict:dict];
            [array addObject:list];
        }
        self.section = array;
    }
    return self;
}
+(instancetype)groupWithDict:(NSDictionary *)dict{
    return [[self alloc]initWithDict:dict];
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}
+(NSArray *)getModel{
    NSArray *array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"KYLeft.plist" ofType:nil]];
    NSMutableArray *tempArray = [NSMutableArray array];
    for (NSDictionary *dict in array) {
        KYGroupModel *group = [KYGroupModel groupWithDict:dict];
        [tempArray addObject:group];
    }
    return tempArray.copy;
}
@end
